package com.alm.handle.core.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.Date;

@Data
@TableName("alm_area_info")
public class SysAreaInfo {

    @TableId(value = "menu_id", type = IdType.AUTO)
    private Long menuId;

    @TableField(value = "menu_name")
    private String menuName;

    @TableField(value = "parent_id")
    private Long parentId;

    @TableField(value = "order_num")
    private Integer orderNum;

    @TableField(value = "path")
    private String path;

    @TableField(value = "component")
    private String component;

    @TableField(value = "query")
    private String query;

    @TableField(value = "is_frame")
    private Integer isFrame;

    @TableField(value = "is_cache")
    private Integer isCache;

    @TableField(value = "menu_type")
    private Character menuType;

    @TableField(value = "visible")
    private Character visible;

    @TableField(value = "status")
    private Character status;

    @TableField(value = "perms")
    private String perms;

    @TableField(value = "icon")
    private String icon;

    @TableField(value = "create_by")
    private Long createBy;

    @TableField(value = "create_time")
    private Date createTime;

    @TableField(value = "update_by")
    private String updateBy;

    @TableField(value = "update_time")
    private Date updateTime;

    @TableField(value = "remark")
    private String remark;

    @TableField(exist = false)
    private String childIds;

    public void setChildIds(String childIds) {
            if(this.childIds==null){
                this.childIds = childIds;
            }else{
                if(childIds==null)
                    return;
                this.childIds += ","+childIds;
        }

    }
}
